/**
 * 
 */
package feedme.dao.impl;


import feedme.dao.DaoFactory;
import feedme.dao.FoodDao;
import feedme.dao.FoodServerDao;
import feedme.dao.OrderDao;

/**
 * @author kinzhang
 *
 */
public class MongoDBDaoFactoryImpl implements DaoFactory {

    private FoodDao foodDao;
    private FoodServerDao foodServerDao;
    private OrderDao orderDao;
    
    /*
    public MongoDBDaoFactoryImpl(){
        
    }
    */

    /**
     * 
     */
    public MongoDBDaoFactoryImpl(
            FoodDao foodDao,
            FoodServerDao foodServerDao,
            OrderDao orderDao) {
        this.foodDao = foodDao;
        this.foodServerDao = foodServerDao;
        this.orderDao = orderDao;
        
       
        /*
        ApplicationContext cxt = 
            new ClassPathXmlApplicationContext("MongoDBDaoFactoryImpl.spring.xml");
        foodDao = cxt.getBean("mongoDBFoodDaoBean", FoodDao.class);
        foodServerDao = cxt.getBean("mongoDBFoodDaoBean", FoodServerDao.class);
        orderDao = cxt.getBean("mongoDBFoodDaoBean", OrderDao.class);
        */
    }

    

    public FoodDao getFoodDaoInstance() {
        return foodDao;
    }

    public FoodServerDao getFoodServerDaoInstance() {
        return foodServerDao;
    }

    public OrderDao getOrderDaoInstance() {
        return orderDao;
    }
    
    



    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub

    }

}
